<?php
require 'functions.php';
require '../data/data.php';

$id = $_GET['id'];


$sql = "delete from users where id=?";
$args = [$id];
$affected = execute($sql, $args);

if ($affected == 1) {
   redirect('删除用户信息成功');
} else {
   error('删除用户信息失败', '../index.php');
}